﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using DTO;

namespace DAO
{
    public class XeMay_DAO
    {
        dbConnection db;

        public DataTable LayDanhSachXeMay()
        {
            db = new dbConnection();
            return db.executeQuery("select * from xemay");
        }

        public DataTable TimKiemXe(string soxe)
        {
            db = new dbConnection();
            string sqlString = "select * from xemay where soxe=@sx";
            SqlParameter sqlParam = new SqlParameter("@sx", soxe);
            return db.executeQuery(sqlString, sqlParam);
        }
    }
}
